<div id="module_gallery_new">
	<!--<h2 class="header tab tabDark">แกลเลอรี่รูปภาพ</h2>-->
	<h2 class="moduleHeader headerGallery">แกลเลอรี่รูปภาพ</h2>
	<a href="<?php echo $gallery_url;?>" target="_blank" class="readmore">ดูทั้งหมด&nbsp;&raquo;</a>
	<ul>
		<?php foreach($dataModuleGalleryNew as $key => $value):?>
			<?php 
				switch($key):
					case 0:
						$class='class="first"';
						$dimension="260x175";
					break;
					default:
						$class='class="second"';
						$dimension="115x75";					
				endswitch;
			?>
		<li <?php echo $class;?>>
			<a href="<?php echo $gallery_url.'archives/'.$value->gallery_id.'-'.seo_url($value->gallery_name);?>" target="_blank">
				<div class="image">
					<?php echo exec_image(array(
							'folder'   => 'gallery',
							'dimension'=> $dimension,
							'file_name'=> @$value->image->gallery_file_name.'.'.@$value->image->gallery_file_ext,
							'alt'      => ''.@$value->gallery_name.'',
							'title'    => ''.@$value->gallery_name.''
						)
					);?>	
				</div>
				<span><?php echo $value->gallery_name;?></span>
			</a>
		</li>
		<?php endforeach;?>
	</ul>
</div>